import type { CommonNodeType, VarType, Variable } from '@/components/workflow/types'

export enum WasmMethodType {
  return_one_string = 'return_one_string',
  return_json_string = 'return_json_string',
  return_object = 'return_object',
  custom = 'custom',
}

export type OutputVar = Record<string, {
  type: VarType
  children: null
}>

export type WebAssemblyNodeType = CommonNodeType & {
  variables: Variable[]
  method_type: WasmMethodType
  method: string
  url: string
  outputs: OutputVar
}
